import { isDev, developmentUrl } from "@/configurations";
export const loginOutApi = () => {
  if (isDev) {
    window.location.reload();
    return false;
  }
  let url = isDev
    ? developmentUrl
    : `${document.location.protocol}//${window.location.hostname}:${window.location.port}/fabu-admin/login`;
  let isSc = false; //是否生产环境
  if (url.indexOf("cmdb.gzbbn.com.cn") > -1) {
    isSc = true;
  }
  let apiUrl = isSc
    ? "https://xtbg.gdzwfw.gov.cn"
    : "https://xtbg.digitalgd.com.cn";
  let client_id = isSc ? "zwrz_gzznywgl" : "zwrz_gzznywgl",
    backurl = url;
  window.location.replace(
    `${apiUrl}/zwrz/rz/sso/logout?client_id=${client_id}&backurl=${backurl}`
  );
};
